package cn.MaySoon.shenfu;

import com.germ.germplugin.api.dynamic.gui.GermGuiScreen;
import com.germ.germplugin.api.dynamic.gui.part.GermGuiButton;
import com.germ.germplugin.api.dynamic.gui.part.GermGuiLabel;
import com.germ.germplugin.api.dynamic.gui.part.GermGuiPart;
import com.germ.germplugin.api.dynamic.gui.part.GermGuiTexture;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

public class Germ {
    public static GermGuiScreen shenfugerm(Player p){
        File file = new File(main.plugin.getDataFolder(),"shenfu.yml");
        YamlConfiguration guidata = YamlConfiguration.loadConfiguration(file);
        GermGuiScreen shenfugui =  GermGuiScreen.getGermGuiScreen("shenfu",guidata.getConfigurationSection("shenfu"));
        shenfu shenfu = main.PlayerShenFuData.get(p);
        int jie = shenfu.getPlayerjie();
        int xing = shenfu.getPlayerxing();
        int level = shenfu.getPlayerlevel();
        GermGuiTexture 阶label = (GermGuiTexture) shenfugui.getGuiPart("阶label_picture");
        阶label.setPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/"+jie+".png");
        shenfugui = setXing(level,xing,shenfugui);
        Number 攻击 = main.PlayerAttribute.get(p).attributeValue.get("物理伤害")[0];
        Number 防御 = main.PlayerAttribute.get(p).attributeValue.get("物理防御")[0];
        Number 生命 = main.PlayerAttribute.get(p).attributeValue.get("生命上限")[0];
        Number 暴击 = main.PlayerAttribute.get(p).attributeValue.get("暴击")[0];
        Number 抗暴 = main.PlayerAttribute.get(p).attributeValue.get("抗暴")[0];
        Number 闪避 = main.PlayerAttribute.get(p).attributeValue.get("闪避")[0];
        Number 命中 = main.PlayerAttribute.get(p).attributeValue.get("命中")[0];
        Double 战力 = main.PlayerAttribute.get(p).getCombatPower();
        GermGuiLabel 攻击label = (GermGuiLabel) shenfugui.getGuiPart("物理伤害_label");
        GermGuiLabel 防御label = (GermGuiLabel) shenfugui.getGuiPart("物理防御_label");
        GermGuiLabel 生命label = (GermGuiLabel) shenfugui.getGuiPart("生命上限_label");
        GermGuiLabel 闪避label = (GermGuiLabel) shenfugui.getGuiPart("闪避几率_label");
        GermGuiLabel 暴击label = (GermGuiLabel) shenfugui.getGuiPart("命中几率_label");
        GermGuiLabel 命中label = (GermGuiLabel) shenfugui.getGuiPart("暴击几率_label");
        GermGuiLabel 抗暴label = (GermGuiLabel) shenfugui.getGuiPart("暴击抗性_label");
        GermGuiLabel 战力label = (GermGuiLabel) shenfugui.getGuiPart("战力_label");
        GermGuiLabel 撕裂label = (GermGuiLabel) shenfugui.getGuiPart("撕裂几率_label");
        GermGuiLabel 金币label = (GermGuiLabel) shenfugui.getGuiPart("金币消耗_label");

        攻击label.setText("§f"+攻击.intValue());
        防御label.setText("§f"+防御.intValue());
        生命label.setText("§f"+生命.intValue());
        闪避label.setText("§f"+闪避.intValue());
        暴击label.setText("§f"+暴击.intValue());
        命中label.setText("§f"+命中.intValue());
        抗暴label.setText("§f"+抗暴.intValue());
        战力label.setText("§4§l§o"+战力.intValue());

        int 撕裂 = shenfu.getPlayerjie();
        撕裂label.setText("§a"+撕裂+"%");
        int money =main.config.getInt("shenfu."+(shenfu.getPlayerlevel()+1)+".money");
        金币label.setText("#FF7FFF00§l"+money);
        File pfile = new File(main.plugin.getDataFolder() + "/PlayerData/" + p.getName() + ".yml");
        YamlConfiguration pdata = YamlConfiguration.loadConfiguration(pfile);
        System.out.println(jie);
        setpic(jie,shenfugui);
        setjineng大师(p,shenfugui,pdata);
        setjineng防御(p,shenfugui,pdata);
        setjineng攻击(p,shenfugui,pdata);
        setjineng高级生命(p,shenfugui,pdata);
        setjineng生命(p,shenfugui,pdata);
        shenfusilie(jie,shenfugui);
        return shenfugui;
    }

    public static void RebuildGui(GermGuiScreen shenfugui ,Player p){
        shenfu shenfu = main.PlayerShenFuData.get(p);
        int jie = shenfu.getPlayerjie();
        int xing = shenfu.getPlayerxing();
        int level = shenfu.getPlayerlevel();
        GermGuiTexture 阶label = (GermGuiTexture) shenfugui.getGuiPart("阶label_picture");
        阶label.setPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/"+jie+".png");
        shenfugui = setXing(level,xing,shenfugui);
        Number 攻击 = main.PlayerAttribute.get(p).attributeValue.get("物理伤害")[0];
        Number 防御 = main.PlayerAttribute.get(p).attributeValue.get("物理防御")[0];
        Number 生命 = main.PlayerAttribute.get(p).attributeValue.get("生命上限")[0];
        Number 暴击 = main.PlayerAttribute.get(p).attributeValue.get("暴击")[0];
        Number 抗暴 = main.PlayerAttribute.get(p).attributeValue.get("抗暴")[0];
        Number 闪避 = main.PlayerAttribute.get(p).attributeValue.get("闪避")[0];
        Number 命中 = main.PlayerAttribute.get(p).attributeValue.get("命中")[0];
        Double 战力 = main.PlayerAttribute.get(p).getCombatPower();
        GermGuiLabel 攻击label = (GermGuiLabel) shenfugui.getGuiPart("物理伤害_label");
        GermGuiLabel 防御label = (GermGuiLabel) shenfugui.getGuiPart("物理防御_label");
        GermGuiLabel 生命label = (GermGuiLabel) shenfugui.getGuiPart("生命上限_label");
        GermGuiLabel 闪避label = (GermGuiLabel) shenfugui.getGuiPart("闪避几率_label");
        GermGuiLabel 暴击label = (GermGuiLabel) shenfugui.getGuiPart("命中几率_label");
        GermGuiLabel 命中label = (GermGuiLabel) shenfugui.getGuiPart("暴击几率_label");
        GermGuiLabel 抗暴label = (GermGuiLabel) shenfugui.getGuiPart("暴击抗性_label");
        GermGuiLabel 战力label = (GermGuiLabel) shenfugui.getGuiPart("战力_label");
        GermGuiLabel 撕裂label = (GermGuiLabel) shenfugui.getGuiPart("撕裂几率_label");
        GermGuiLabel 金币label = (GermGuiLabel) shenfugui.getGuiPart("金币消耗_label");

        攻击label.setText("§f"+攻击.intValue());
        防御label.setText("§f"+防御.intValue());
        生命label.setText("§f"+生命.intValue());
        闪避label.setText("§f"+闪避.intValue());
        暴击label.setText("§f"+暴击.intValue());
        命中label.setText("§f"+命中.intValue());
        抗暴label.setText("§f"+抗暴.intValue());
        战力label.setText("§4§l§o"+战力.intValue());

        int 撕裂 = shenfu.getPlayerjie();
        撕裂label.setText("§a"+撕裂+"%");
        int money =main.config.getInt("shenfu."+(shenfu.getPlayerlevel()+1)+".money");
        金币label.setText("#FF7FFF00§l"+money);
        File file = new File(main.plugin.getDataFolder() + "/PlayerData/" + p.getName() + ".yml");
        YamlConfiguration data = YamlConfiguration.loadConfiguration(file);
        setpic(jie,shenfugui);

        setjineng大师(p,shenfugui,data);
        setjineng防御(p,shenfugui,data);
        setjineng攻击(p,shenfugui,data);
        setjineng高级生命(p,shenfugui,data);
        setjineng生命(p,shenfugui,data);
        shenfusilie(jie,shenfugui);
    }




    public static GermGuiScreen setXing(int level, int xing,GermGuiScreen shenfugui){
        if (level==0){
            GermGuiTexture xing1 = (GermGuiTexture) shenfugui.getGuiPart("星星1_picture");
            xing1.setEnable(false);
            GermGuiTexture xing2 = (GermGuiTexture) shenfugui.getGuiPart("星星2_picture");
            xing2.setEnable(false);
            GermGuiTexture xing3 = (GermGuiTexture) shenfugui.getGuiPart("星星3_picture");
            xing3.setEnable(false);
            GermGuiTexture xing4 = (GermGuiTexture) shenfugui.getGuiPart("星星4_picture");
            xing4.setEnable(false);
            GermGuiTexture xing5 = (GermGuiTexture) shenfugui.getGuiPart("星星5_picture");
            xing5.setEnable(false);
            GermGuiTexture xing6 = (GermGuiTexture) shenfugui.getGuiPart("星星6_picture");
            xing6.setEnable(false);
            GermGuiTexture xing7 = (GermGuiTexture) shenfugui.getGuiPart("星星7_picture");
            xing7.setEnable(false);
            GermGuiTexture xing8 = (GermGuiTexture) shenfugui.getGuiPart("星星8_picture");
            xing8.setEnable(false);
            GermGuiTexture xing9 = (GermGuiTexture) shenfugui.getGuiPart("星星9_picture");
            xing9.setEnable(false);
            GermGuiTexture xing10 = (GermGuiTexture) shenfugui.getGuiPart("星星10_picture");
            xing10.setEnable(false);
        return shenfugui;


        }
        if (xing>=0) {
            GermGuiTexture xing1 = (GermGuiTexture) shenfugui.getGuiPart("星星1_picture");
            xing1.setEnable(true);
        }
        else{
            GermGuiTexture xing1 = (GermGuiTexture) shenfugui.getGuiPart("星星1_picture");
            xing1.setEnable(false);
        }
        if (xing>=2) {
            GermGuiTexture xing2 = (GermGuiTexture) shenfugui.getGuiPart("星星2_picture");
            xing2.setEnable(true);
        }
        else{
            GermGuiTexture xing2 = (GermGuiTexture) shenfugui.getGuiPart("星星2_picture");
            xing2.setEnable(false);
        }
        if (xing>=3) {
            GermGuiTexture xing3 = (GermGuiTexture) shenfugui.getGuiPart("星星3_picture");
            xing3.setEnable(true);
        }
        else{
            GermGuiTexture xing3 = (GermGuiTexture) shenfugui.getGuiPart("星星3_picture");
            xing3.setEnable(false);
        }
        if (xing>=4) {
            GermGuiTexture xing4 = (GermGuiTexture) shenfugui.getGuiPart("星星4_picture");
            xing4.setEnable(true);
        }
        else{
            GermGuiTexture xing4 = (GermGuiTexture) shenfugui.getGuiPart("星星4_picture");
            xing4.setEnable(false);
        }
        if (xing>=5) {
            GermGuiTexture xing5 = (GermGuiTexture) shenfugui.getGuiPart("星星5_picture");
            xing5.setEnable(true);
        }
        else{
            GermGuiTexture xing5 = (GermGuiTexture) shenfugui.getGuiPart("星星5_picture");
            xing5.setEnable(false);
        }

        if (xing>=6) {
            GermGuiTexture xing6 = (GermGuiTexture) shenfugui.getGuiPart("星星6_picture");
            xing6.setEnable(true);
        }
        else{
            GermGuiTexture xing6 = (GermGuiTexture) shenfugui.getGuiPart("星星6_picture");
            xing6.setEnable(false);
        }
        if (xing>=7) {
            GermGuiTexture xing7 = (GermGuiTexture) shenfugui.getGuiPart("星星7_picture");
            xing7.setEnable(true);
        }
        else{
            GermGuiTexture xing7 = (GermGuiTexture) shenfugui.getGuiPart("星星7_picture");
            xing7.setEnable(false);
        }
        if (xing>=8) {
            GermGuiTexture xing8 = (GermGuiTexture) shenfugui.getGuiPart("星星8_picture");
            xing8.setEnable(true);
        }
        else{
            GermGuiTexture xing8 = (GermGuiTexture) shenfugui.getGuiPart("星星8_picture");
            xing8.setEnable(false);
        }
        if (xing>=9) {
            GermGuiTexture xing9 = (GermGuiTexture) shenfugui.getGuiPart("星星9_picture");
            xing9.setEnable(true);
        }
        else{
            GermGuiTexture xing9 = (GermGuiTexture) shenfugui.getGuiPart("星星9_picture");
            xing9.setEnable(false);
        }
        if (xing>=10) {
            GermGuiTexture xing10 = (GermGuiTexture) shenfugui.getGuiPart("星星10_picture");
            xing10.setEnable(true);
        }
        else{
            GermGuiTexture xing10 = (GermGuiTexture) shenfugui.getGuiPart("星星10_picture");
            xing10.setEnable(false);
        }
        return shenfugui;
    }

    public static void setpic(int jie,GermGuiScreen shenfugui){
        GermGuiTexture 神符图_picture = (GermGuiTexture) shenfugui.getGuiPart("神符图_picture");
        String path = "url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/mx_shenfulv_v9028%5B1%5D.png";
        if (jie<=2){
            path = "url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/mx_shenfulv_v9028%5B1%5D.png";
        }
       else if (jie<=4){
            path = "url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/mx_shenfulan_v9028%5B1%5D.png";
        }
        else if (jie<=6){
            path = "url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/mx_shenfuzi_v16819%5B1%5D.png";
        }
        else if (jie<=8){
            path = "url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/mx_shenfuhuang_v9028%5B1%5D.png";
        }
        else if (jie<=10){
            path = "url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/mx_shenfuhong_v9028%5B1%5D.png";
        }
        神符图_picture.setPath(path);
    }

    public static void shenfusilie(int jie,GermGuiScreen shenfugui){
        GermGuiTexture 神符撕裂图_picture = (GermGuiTexture) shenfugui.getGuiPart("神符撕裂_picture");
        String path = "url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/silie/level"+jie+".png";
        神符撕裂图_picture.setPath(path);
    }
    public static void setjineng防御(Player p,GermGuiScreen shenfugui ,YamlConfiguration data){
        int level = data.getInt("jineng.防御");
        boolean light = false;
        if (level>0){
            light =true;
        }
        GermGuiButton 技能防御_button = (GermGuiButton) shenfugui.getGuiPart("技能防御_button");
        List<String> Lore = new ArrayList<>();
        if (!light) {
            Lore.add("§d§l神符防御");
            Lore.add("  §a当前等级: §41级(未激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加防御§a500");
            Lore.add("§6§l[激活条件]");
            if (main.PlayerShenFuData.get(p).getPlayerjie()>=2){
                Lore.add("§a1.神符达到2阶(已达成)");
            }
            else{
                Lore.add("§41.神符达到2阶(未达成)");
            }
            Lore.add("§42.消耗神符技能激活书X1(0/1)(未达成)");
            技能防御_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/a.png");
            技能防御_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/a.png");

    }
        else{
            Lore.add("§d§l神符防御");
            Lore.add("  §a当前等级: §4"+data.getInt("jineng.防御")+"级(已激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加防御§a500");
            Lore.add("§6§l[激活条件]");
            Lore.add("§a1.神符达到2阶(已达成)");
            Lore.add("§a2.消耗神符技能激活书X1(1/1)(已达成)");
            技能防御_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16003_v9028%5B1%5D.png");
            技能防御_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16003_v9028%5B1%5D.png");
        }
        技能防御_button.setTooltip(Lore);
    }
    public static void setjineng生命(Player p,GermGuiScreen shenfugui ,YamlConfiguration data){
        int level = data.getInt("jineng.生命");
        boolean light = false;
        if (level>0){
            light =true;
        }
        GermGuiButton 技能生命_button = (GermGuiButton) shenfugui.getGuiPart("技能生命_button");
        List<String> Lore = new ArrayList<>();
        if (!light) {
            Lore.add("§d§l神符生命");
            Lore.add("  §a当前等级: §41级(未激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加生命§a4000");
            Lore.add("§6§l[激活条件]");
            if (main.PlayerShenFuData.get(p).getPlayerjie()>=4){
                Lore.add("§a1.神符达到4阶(已达成)");
            }
            else{
                Lore.add("§41.神符达到4阶(未达成)");
            }
            if (data.getInt("jineng.防御")>=1){
                Lore.add("§a2.神符防御达到1级(1/1)(已达成)");
            }
            else{
                Lore.add("§42.神符防御达到1级(0/1)(未达成)");
            }

            Lore.add("§43.消耗神符技能激活书X1(0/1)(未达成)");
            技能生命_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/b.png");
            技能生命_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/b.png");

        }
        else{
            Lore.add("§d§l神符生命");
            Lore.add("  §a当前等级: §4"+data.getInt("jineng.生命")+"级(已激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加生命§a4000");
            Lore.add("§6§l[激活条件]");
            Lore.add("§a1.神符达到4阶(已达成)");
            Lore.add("§a2.神符神符防御达到1级(1/1)(已达成)");
            Lore.add("§a3.消耗神符技能激活书X1(1/1)(已达成)");
            技能生命_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16003_v9028%5B1%5D.png");
            技能生命_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16003_v9028%5B1%5D.png");
        }
        技能生命_button.setTooltip(Lore);

    }


    public static void setjineng攻击(Player p,GermGuiScreen shenfugui ,YamlConfiguration data){
        int level = data.getInt("jineng.攻击");
        boolean light = false;
        if (level>0){
            light =true;
        }
        GermGuiButton 技能攻击_button = (GermGuiButton) shenfugui.getGuiPart("技能攻击_button");
        List<String> Lore = new ArrayList<>();
        if (!light) {
            Lore.add("§d§l神符攻击");
            Lore.add("  §a当前等级: §41级(未激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加攻击§a250");
            Lore.add("§6§l[激活条件]");
            if (main.PlayerShenFuData.get(p).getPlayerjie()>=2){
                Lore.add("§a1.神符达到4阶(已达成)");
            }
            else{
                Lore.add("§41.神符达到4阶(未达成)");
            }
            if (data.getInt("jineng.生命")>=1){
                Lore.add("§a2.神符生命达到1级(1/1)(已达成)");
            }
            else{
                Lore.add("§42.神符生命达到1级(0/1)(未达成)");
            }
            Lore.add("§43.消耗神符技能激活书X1(0/1)(未达成)");
            技能攻击_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/c.png");
            技能攻击_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/c.png");

        }
        else{
            Lore.add("§d§l神符攻击");
            Lore.add("  §a当前等级: §4"+data.getInt("jineng.攻击")+"级(已激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加攻击§a250");
            Lore.add("§6§l[激活条件]");
            Lore.add("§a1.神符达到2阶(已达成)");
            Lore.add("§a2.消耗神符技能激活书X1(1/1)(已达成)");
            技能攻击_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16001_v9028%5B1%5D.png");
            技能攻击_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16001_v9028%5B1%5D.png");
        }
        技能攻击_button.setTooltip(Lore);

    }

    public static void setjineng高级生命(Player p,GermGuiScreen shenfugui ,YamlConfiguration data){
        int level = data.getInt("jineng.高级生命");
        boolean light = false;
        if (level>0){
            light =true;
        }
        GermGuiButton 技能高级生命_button = (GermGuiButton) shenfugui.getGuiPart("技能高级生命_button");
        List<String> Lore = new ArrayList<>();
        if (!light) {
            Lore.add("§d§l神符高级生命");
            Lore.add("  §a当前等级: §41级(未激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加生命§a8000");
            Lore.add("§6§l[激活条件]");
            if (main.PlayerShenFuData.get(p).getPlayerjie()>=4){
                Lore.add("§a1.神符达到4阶(已达成)");
            }
            else{
                Lore.add("§41.神符达到4阶(未达成)");
            }
            if (data.getInt("jineng.攻击")>=1){
                Lore.add("§a2.神符攻击达到1级(1/1)(已达成)");
            }
            else{
                Lore.add("§42.神符攻击达到1级(0/1)(未达成)");
            }

            Lore.add("§43.消耗神符技能激活书X1(0/1)(未达成)");
            技能高级生命_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/d.png");
            技能高级生命_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/d.png");

        }
        else{
            Lore.add("§d§l神符高级生命");
            Lore.add("  §a当前等级: §4"+data.getInt("jineng.高级生命")+"级(已激活)");
            Lore.add("  §a最大等级: §420级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l增加生命§a4000");
            Lore.add("§6§l[激活条件]");
            Lore.add("§a1.神符达到4阶(已达成)");
            Lore.add("§a2.神符神符攻击达到1级(1/1)(已达成)");
            Lore.add("§a3.消耗神符技能激活书X1(1/1)(已达成)");
            技能高级生命_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16004_v9028%5B1%5D.png");
            技能高级生命_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16004_v9028%5B1%5D.png");
        }
        技能高级生命_button.setTooltip(Lore);

    }

    public static void setjineng大师(Player p,GermGuiScreen shenfugui ,YamlConfiguration data){
        int level = data.getInt("jineng.大师");
        boolean light = false;
        if (level>0){
            light =true;
        }
        GermGuiButton 技能大师_button = (GermGuiButton) shenfugui.getGuiPart("技能大师_button");
        List<String> Lore = new ArrayList<>();
        if (!light) {
            Lore.add("§d§l神符大师");
            Lore.add("  §a当前等级: §41级(未激活)");
            Lore.add("  §a最大等级: §45级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l所有神符的技能属性提高100%");
            Lore.add("§6§l[激活条件]");
            if (main.PlayerShenFuData.get(p).getPlayerjie()>=4){
                Lore.add("§a1.神符达到5阶(已达成)");
            }
            else{
                Lore.add("§41.神符达到5阶(未达成)");
            }
            if (data.getInt("jineng.高级生命")>=1){
                Lore.add("§a2.神符高级生命达到1级(1/1)(已达成)");
            }
            else{
                Lore.add("§42.神符高级生命达到1级(0/1)(未达成)");
            }

            Lore.add("§43.消耗神符技能激活书X1(0/1)(未达成)");

            技能大师_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/e.png");
            技能大师_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/e.png");

        }
        else{
            Lore.add("§d§l神符大师");
            Lore.add("  §a当前等级: §4"+data.getInt("jineng.大师")+"级(已激活)");
            Lore.add("  §a最大等级: §45级");
            Lore.add("§6§l[本级效果]");
            Lore.add("§f§l所有神符的技能属性提高100%");
            Lore.add("§6§l[激活条件]");
            Lore.add("§a1.神符达到5阶(已达成)");
            Lore.add("§a2.神符高级生命达到1级(1/1)(已达成)");
            Lore.add("§a3.消耗神符技能激活书X1(1/1)(已达成)");

            技能大师_button.setDefaultPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16005_v9028%5B1%5D.png");
            技能大师_button.setHoverPath("url<->https://mfcraftzsdl.oss-cn-hangzhou.aliyuncs.com/shenfu/skill-16005_v9028%5B1%5D.png");
        }
        技能大师_button.setTooltip(Lore);
    }
}
